<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>Test for Mozilla bug 1066554 - Shadow DOM loads MathML stylesheets as needed</title>
<link rel="match" href="shadow-dom-mozilla-1066554-ref.html"/>
<body>
  <div id="x"></div>
  <script>
    function insertShadowMathML() {
      var x = document.getElementById("x");
      x.attachShadow({ mode: "open" });
      x.shadowRoot.innerHTML =
        '<math><msup><mi>X</mi><mi>X</mi></msup></math>';
      document.documentElement.removeAttribute("class");
    }
    document.documentElement.addEventListener("TestRendered", insertShadowMathML);
  </script>
</body>
</html>
